<template>
  <a-modal
    :title="title"
    :visible="visible"
    @ok="handleOk"
    @cancel="handleCancel"
  >
    <slot></slot>
  </a-modal>
</template>

<script>
export default {
  name: "ModelAdd",
  props: {
    title: {
      type: String,
      default: "新增",
    },

    visible: {
      type: Boolean,
      default: true,
    },
  },
  methods: {
    handleOk() {
      this.$emit("handleOk");
    },
    handleCancel() {
      this.$emit("handleCancel");
    },
  },
};
</script>

<style lang="less" scoped>
</style>
